package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.pojo.DtsCategory;
import com.qf.vo.CatVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 类目表 Mapper 接口
 * </p>
 *
 * @author zhaojian
 * @since 2021-05-12
 */
public interface DtsCategoryMapper extends BaseMapper<DtsCategory> {
    @Select("SELECT  id as VALUE,name as label FROM dts_category WHERE LEVEL =\"L1\"")
     List<CatVo> list();
    @Select("select c.* from dts_brand b left join dts_category c on b.default_category_id = c.id where c.deleted = 0")
    List<DtsCategory> showCategorys();
}
